package org.springblade.modules.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.admin.entity.MaintainMsg;
import org.springblade.modules.admin.vo.MaintainMsgVO;
import org.springblade.modules.admin.vo.MsgTypeVO;

import java.util.List;

public interface MaintainMsgMapper extends BaseMapper<MaintainMsg> {
    /**
     * 根据分类统计未读消息数量
     *
     * @param userId
     * @return
     */
    List<MsgTypeVO> listMsgTye(@Param("userId") Long userId);

    List<MaintainMsgVO> selectMsgPage(@Param("typeId") Integer typeId, @Param("status") Integer status,@Param("bType") Integer bType, @Param("userId") Long userId, IPage<MaintainMsgVO> page);

    MaintainMsgVO selectMsgById(@Param("id") Long id);
}
